#!/bin/sh

ver_new="$1"
ver_old="$2"

if [ "$(apk version -t "$ver_old" "2.3.0-r1")" = "<" ]; then
	cat >&2 <<-EOF
	*
	* Knot utilities kdig, khost, knsec3hash, and knsupdate have been moved
	* to subpackage knot-utils. If you use them, run: apk add knot-utils.
	*
	EOF
fi
if [ "$(apk version -t "$ver_old" "3.0.0-r0")" = "<" ]; then
	cat >&2 <<-EOF
	*
	* Knot utilities keymgr and kjournalprint have been moved to subpackage
	* knot-utils. If you use them, run: apk add knot-utils.
	*
	EOF
fi
if [ "$(apk version -t "$ver_old" "3.1.4-r0")" = "<" ]; then
	cat >&2 <<-EOF
	*
	* GeoIP module has been moved to a subpackage. If you use it, install it:
	* apk add knot-mod-geoip.
	*
	EOF
fi

exit 0
